public class lk6196 {
    public static void main(String[] args) {
        
    }
    public static int minCostToMoveChips(int[] position) {
        int n= position.length;
        int count=0;
        for(int i=0;i<n;i++){
            if(position[i]%2==0){
                count++;
            }
        }
        return Math.max(count, n-count);
    }
}
